import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        islogin:false,
        selected:0,
        userId:'',
        searchWord:""
    },
    mutations: {
        changeLoginState(state, islogin) {
            state.islogin = islogin;
        },
        changeSelectState(state, selected) {
            state.selected = selected;
        },
        setUserId(state,userId){
            state.userId = userId
        },
        setSearchWord(state,searchWord){
            state.searchWord = searchWord
        }
    },
    actions: {
    },
    modules: {
    },
    getters: {
        islogin(state) {
            return state.islogin;
        }
    }
})
